package  
{
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.events.TimerEvent;
	import flash.utils.Timer;
	/**
	 * ...
	 * @author ...
	 */
	public class FadaAmarela extends Faerie
	{
		private var direction :int = 1;
		private var timFaerieAnimation : Timer = new Timer(280);
		
		public function FadaAmarela() 
		{

			
			timFaerieAnimation.addEventListener(TimerEvent.TIMER, FaerieAnimation);
			
		
		}

		override public function updateFaeriePosition(player : MovieClip):void 
		{		
			this.y = player.y - player.height / 2 - this.height / 2 - 7;
			
			if (player.direction == 1)
			{
				(this.x = player.x - player.width / 2 - this.width / 2 - 20 );
			}
			else
			{
				this.x = player.x - player.width / 2 + this.width / 2 + 20;
			}
		
				
		}
		
		private function FaerieAnimation(e:TimerEvent)
		{
			
			this.y += Math.random();
			this.x += Math.random()*3;
		}
		
		
	}

}